Platform Explorer / Nuxeo Platform 2021.50

Extension point resources

Documentation

The resources extension point allows to declare typed resources, with dependencies.

Example:

    <resource name="foldable-box.js">
        <path>scripts/foldable-box.js</path>
        <require>effects</require>
    </resource>

There are several ways to declare the resource type. It can be retrieved from the resource name ('js' for above example) or declared explicitely, for instance the following declaration is almost equivalent (the resource name changes).

    <resource name="foldable-box" type="js">
        <path>scripts/foldable-box.js</path>
        <require>effects</require>
    </resource>

The above example also specifies a dependency on a resource named "effects", any number of dependencies can be piled up on the declaration:

    <resource name="foldable-box" type="js">
        <path>scripts/foldable-box.js</path>
        <require>effects</require>
        <require>jquery</require>
    </resource>

When aggregating resources with dependencies, order will be respected: for instance, the effects and jquery resources will be declared *before* the foldable-box resource in above example.

The "path" element resolves the resource inside the jar that holds the extension point contribution declaration. An alternative way can be used to reference the resource path in the nuxeo.war directory:

    <resource name="foldable-box.js">
        <uri>/scripts/foldable-box.js</uri>
    </resource>

Notice the "uri" element instead of the "path", and leading slash (making the resource lookup from the war directory root).

When only the path is filled, the resource uri is filled automatically with the resource classpath uri in the corresponding runtime bundle context.

When using the uri element, wildcard are supported, for instance:

    <resource name="scripts.js">
        <uri>/scripts/*.js</uri>
    </resource>

Alternatively, classpath, file URL and external URLs are allowed:

    <uri>classpath:com/mycompany/resources/script.js</uri>
    <uri>file:c:/temp/file.css</uri>
    <uri>http://www.site.com/static/style.css</uri>

Minimization, URL rewriting, etc... processing of resources can be applied implicitly to all resources of a given type. Resources definition can also explicitly reference processors that should to be applied to them, see the "processors" extension point documentation.

    <resource name="foldable-box.css">
        <path>css/foldable-box.css</path>
        <processors>
            <processor>flavor</processor>
        </processors>
    </resource>

Contribution Descriptors

  • Class: org.nuxeo.ecm.web.resources.core.ResourceDescriptor

Existing Contributions

Contributions are presented in the same order as the registration order on this extension point. This order is displayed before the contribution name, in brackets.

  • nuxeo-admin-center-jsf-2021.50.12.jar /OSGI-INF/theme-contrib.xml
    <extension point="resources" target="org.nuxeo.ecm.platform.WebResources">
    
        <resource name="nuxeo_admincenter_specific.scss" type="css">
          <path>themes/sass/nuxeo_admincenter_specific.scss</path>
          <processors>
            <processor>sassCss</processor>
          </processors>
        </resource>
    
      </extension>
  • nuxeo-platform-webapp-base-2021.50.12.jar /OSGI-INF/webresources-contrib.xml
    <extension point="resources" target="org.nuxeo.ecm.platform.WebResources">
    
        <resource name="jquery.client.js">
          <uri>/scripts/dnd/jquery.client.js</uri>
        </resource>
        <resource name="jquery.dnd-file-upload.js">
          <uri>/scripts/dnd/jquery.dnd-file-upload.js</uri>
        </resource>
        <resource name="nxdropzone.js">
          <uri>/scripts/dnd/nxdropzone.js</uri>
        </resource>
        <resource name="nxinternaldnd.js">
          <uri>/scripts/dnd/nxinternaldnd.js</uri>
        </resource>
    
      </extension>
  • nuxeo-platform-webapp-core-2021.50.12.jar /OSGI-INF/theme-contrib.xml
    <extension point="resources" target="org.nuxeo.ecm.platform.WebResources">
    
        <!-- JSF resources -->
        <resource name="jsf.js" target="bodystart" type="jsfjs">
          <uri>javax.faces:jsf.js</uri>
        </resource>
        <resource name="fixjsfviewstate.js" target="bodystart" type="jsfjs">
          <uri>org.nuxeo.jsf:fixviewstate.min.js</uri>
          <require>jsf.js</require>
        </resource>
        <resource name="fixmultipartajax.js" target="bodystart" type="jsfjs">
          <uri>org.nuxeo.jsf:fixmultipartajax.min.js</uri>
          <require>jsf.js</require>
        </resource>
        <resource name="richfaces-jquery.js" target="bodystart" type="jsfjs">
          <uri>org.richfaces:jquery.js</uri>
        </resource>
        <resource name="jquery-migrate.js">
          <uri>/scripts/jquery-migrate-1.4.1.js</uri>
        </resource>
        <resource name="richfaces.js" target="bodystart" type="jsfjs">
          <uri>org.richfaces:richfaces.js</uri>
          <require>jsf.js</require>
        </resource>
        <resource name="richfaces-queue.js" target="bodystart" type="jsfjs">
          <uri>org.richfaces:richfaces-queue.js</uri>
          <require>richfaces.js</require>
        </resource>
        <resource name="richfaces-base-component.js" target="bodystart" type="jsfjs">
          <uri>org.richfaces:richfaces-base-component.js</uri>
          <require>richfaces.js</require>
        </resource>
        <resource name="richfaces-fileupload.ecss" target="bodystart" type="jsfcss">
          <uri>org.richfaces:fileupload.ecss</uri>
          <require>richfaces.js</require>
        </resource>
        <resource name="richfaces-fileupload.js" target="bodystart" type="jsfjs">
          <uri>org.richfaces:fileupload.js</uri>
          <require>richfaces-fileupload.ecss</require>
          <require>richfaces.js</require>
        </resource>
        <resource name="widget-utils.js" type="jsfjs">
          <uri>org.nuxeo:widget-utils.min.js</uri>
          <require>richfaces-queue.js</require>
        </resource>
        <resource name="select2.js" type="jsfjs">
          <uri>org.nuxeo.select2:select2.min.js</uri>
          <require>widget-utils.js</require>
        </resource>
    
        <!-- Seam 1.0.1.GA -->
        <resource name="seam-remote.js">
          <uri>/scripts/seam-remote.js</uri>
        </resource>
    
        <resource name="static-styles.css">
          <uri>/css/static-styles.css</uri>
        </resource>
        <resource name="screen.css">
          <uri>/css/screen.css</uri>
        </resource>
        <resource name="foldable-box.js">
          <uri>/scripts/foldable-box.js</uri>
        </resource>
        <resource name="utils.js">
          <uri>/scripts/utils.js</uri>
        </resource>
        <resource name="tableSelections.js">
          <uri>/scripts/tableSelections.js</uri>
        </resource>
        <resource name="contextmenu.js">
          <uri>/scripts/contextmenu.js</uri>
        </resource>
        <resource name="DragAndDrop.js">
          <uri>/scripts/DragAndDrop.js</uri>
        </resource>
        <resource name="hideableAdminMessage.js">
          <uri>/scripts/hideableAdminMessage.js</uri>
        </resource>
        <!-- jquery cookie plugin -->
        <resource name="jquery.tools.cookie.js">
          <uri>/scripts/jquery/cookie.js</uri>
        </resource>
        <!-- Fancybox -->
        <resource name="jquery.fancybox.js">
          <uri>/scripts/jquery/jquery.fancybox.js</uri>
        </resource>
        <resource name="jquery.fancybox.style.css">
          <uri>/css/jquery.fancybox.css</uri>
        </resource>
        <resource name="fancybox-popup-utils.js">
          <uri>/scripts/fancybox-popup-utils.js</uri>
        </resource>
        <!-- Hotkeys (e.g. used to focus the search box using '/') -->
        <resource name="jquery.hotkeys.js">
          <uri>/scripts/jquery/jquery.hotkeys.js</uri>
        </resource>
        <!-- Helpers for focus on first input of a form -->
        <resource name="jquery.tools.focusfirst.js">
          <uri>/scripts/jquery/jquery.tools.focusfirst.js</uri>
        </resource>
        <!-- Workaround for jQuery and Sarissa library conflict on IE -->
        <resource name="sarissa-ie-workaround.js">
          <uri>/scripts/sarissa-ie-workaround.js</uri>
        </resource>
        <!-- Mustache -->
        <resource name="mustache.js">
          <uri>/scripts/mustache/mustache.js</uri>
        </resource>
        <!-- Simple Access Key helper -->
        <resource name="accessKey.js">
          <uri>/scripts/accessKey.js</uri>
        </resource>
        <!-- Moment.js -->
        <resource name="moment.js">
          <uri>/scripts/moment.min-1.5.0nx.js</uri>
        </resource>
        <!-- jquery-ui resources: order plugins according to their dependencies. -->
        <resource name="jquery.ui.core.js">
          <uri>/scripts/jquery/jquery.ui.core.js</uri>
        </resource>
        <resource name="jquery.ui.widget.js">
          <uri>/scripts/jquery/jquery.ui.widget.js</uri>
        </resource>
        <resource name="jquery.ui.mouse.js">
          <uri>/scripts/jquery/jquery.ui.mouse.js</uri>
        </resource>
        <resource name="jquery.ui.sortable.js">
          <uri>/scripts/jquery/jquery.ui.sortable.js</uri>
          <require>jquery.ui.core.js</require>
          <require>jquery.ui.widget.js</require>
          <require>jquery.ui.mouse.js</require>
        </resource>
        <!-- Double click shield -->
        <resource name="jquery.nuxeo.doubleclickshield.js">
          <uri>/scripts/jquery.nuxeo.doubleclickshield.js</uri>
        </resource>
        <!-- jQuery Ambiance -->
        <resource name="jquery.ambiance.js">
          <uri>/scripts/jquery/jquery.ambiance.js</uri>
        </resource>
        <resource name="jquery.ambiance.css">
          <uri>/css/jquery.ambiance.css</uri>
        </resource>
        <resource name="jquery.nuxeo.dropdown.js">
          <uri>/scripts/jquery/jquery.nuxeo.dropdown.js</uri>
        </resource>
        <resource name="jquery.tipsy.js">
          <uri>/scripts/jquery/jquery.tipsy.js</uri>
          <require>tipsy.css</require>
        </resource>
        <resource name="tipsy.css">
          <uri>/css/tipsy.css</uri>
        </resource>
        <resource name="jquery.nuxeo.tipsy.js">
          <uri>/scripts/jquery.nuxeo.tipsy.js</uri>
          <require>jquery.tipsy.js</require>
        </resource>
        <resource name="jquery.nuxeo.tipsy.init.js">
          <uri>/scripts/jquery.nuxeo.tipsy.init.js</uri>
          <require>jquery.nuxeo.tipsy.js</require>
        </resource>
        <resource name="jquery.magnific-popup.js">
          <uri>/scripts/jquery/jquery.magnific-popup.js</uri>
        </resource>
        <resource name="magnific-popup.css">
          <uri>/css/magnific-popup.css</uri>
        </resource>
        <resource name="nuxeo-lightbox.js">
          <uri>/scripts/nuxeo-lightbox.js</uri>
        </resource>
        <resource name="jquery.nuxeo.cv-lightbox.js">
          <uri>/scripts/jquery.nuxeo.cv-lightbox.js</uri>
          <require>jquery.magnific-popup.js</require>
          <require>nuxeo-lightbox.js</require>
        </resource>
        <resource name="nuxeo-documents-import.js">
          <uri>/scripts/nuxeo-documents-import.js</uri>
        </resource>
        <resource name="nuxeo.js">
          <uri>/bower_components/nuxeo/lib/jquery/nuxeo.js</uri>
        </resource>
        <resource name="confirm-alerts.xhtml" type="xhtml">
          <uri>/incl/confirm-alerts.xhtml</uri>
        </resource>
        <resource name="DragAndDrop.js" type="js">
          <uri>/scripts/DragAndDrop.js</uri>
        </resource>
        <resource name="tableSelections.js" type="js">
          <uri>/scripts/tableSelections.js</uri>
        </resource>
        <resource name="customSeamRemotingWaiter.js" type="js">
          <uri>/scripts/customSeamRemotingWaiter.js</uri>
        </resource>
        <resource name="default-contextmenu-actions.js" type="js">
          <uri>/scripts/default-contextmenu-actions.js</uri>
        </resource>
        <resource name="safeEdit.xhtml" type="xhtml">
          <uri>/incl/safeEdit.xhtml</uri>
        </resource>
        <resource name="tinymce.xhtml" type="xhtml">
          <uri>/incl/tinymce.xhtml</uri>
          <require>richfaces-jquery.js</require>
          <require>safeEdit.xhtml</require>
        </resource>
        <resource name="konami.xhtml" type="xhtml">
          <uri>/incl/konami.xhtml</uri>
          <require>richfaces-jquery.js</require>
        </resource>
        <resource name="doubleClick_shield.xhtml" type="xhtml">
          <uri>/incl/doubleClick_shield.xhtml</uri>
          <require>richfaces-jquery.js</require>
        </resource>
        <resource name="layout_dev_init.xhtml" type="xhtml">
          <uri>/widgets/dev/layout_dev_init.xhtml</uri>
          <require>richfaces-jquery.js</require>
        </resource>
        <resource name="seam_remoting.xhtml" type="xhtml">
          <uri>/incl/seam_remoting.xhtml</uri>
          <require>seam-remote.js</require>
        </resource>
        <resource name="nuxeo_javascript_context.xhtml" type="xhtmlfirst">
          <uri>/incl/nuxeo_javascript_context.xhtml</uri>
        </resource>
        <resource name="automation.js">
          <uri>/scripts/automation.js</uri>
        </resource>
    
        <resource name="jquery-standalone.js">
          <uri>/scripts/jquery.js</uri>
        </resource>
        <resource name="mobile-banner.js">
          <uri>/scripts/mobile-banner.js</uri>
        </resource>
        <!-- end of "static" resources declaration -->
    
        <!-- Sass styles -->
        <resource name="normalize.scss" type="css">
          <path>themes/sass/normalize.scss</path>
          <processors>
            <processor>sassCss</processor>
          </processors>
        </resource>
        <resource name="breadcrumb.scss" type="css">
          <path>themes/sass/breadcrumb.scss</path>
          <processors>
            <processor>sassCss</processor>
          </processors>
        </resource>
        <resource name="buttons_and_actions.scss" type="css">
          <path>themes/sass/buttons_and_actions.scss</path>
          <processors>
            <processor>sassCss</processor>
          </processors>
        </resource>
        <resource name="basics.scss" type="css">
          <path>themes/sass/basics.scss</path>
          <processors>
            <processor>sassCss</processor>
          </processors>
        </resource>
        <resource name="body.scss" type="css">
          <path>themes/sass/body.scss</path>
          <processors>
            <processor>sassCss</processor>
          </processors>
        </resource>
        <resource name="drag_and_drop.scss" type="css">
          <path>themes/sass/drag_and_drop.scss</path>
          <processors>
            <processor>sassCss</processor>
          </processors>
        </resource>
        <resource name="foldable_boxes.scss" type="css">
          <path>themes/sass/foldable_boxes.scss</path>
          <processors>
            <processor>sassCss</processor>
          </processors>
        </resource>
        <resource name="forms.scss" type="css">
          <path>themes/sass/forms.scss</path>
          <processors>
            <processor>sassCss</processor>
          </processors>
        </resource>
        <resource name="grids_and_widgets.scss" type="css">
          <path>themes/sass/grids_and_widgets.scss</path>
          <processors>
            <processor>sassCss</processor>
          </processors>
        </resource>
        <resource name="messages_and_tooltips.scss" type="css">
          <path>themes/sass/messages_and_tooltips.scss</path>
          <processors>
            <processor>sassCss</processor>
          </processors>
        </resource>
        <resource name="navigation.scss" type="css">
          <path>themes/sass/navigation.scss</path>
          <processors>
            <processor>sassCss</processor>
          </processors>
        </resource>
        <resource name="popups.scss" type="css">
          <path>themes/sass/popups.scss</path>
          <processors>
            <processor>sassCss</processor>
          </processors>
        </resource>
        <resource name="richfaces_components.scss" type="css">
          <path>themes/sass/richfaces_components.scss</path>
          <processors>
            <processor>sassCss</processor>
          </processors>
        </resource>
        <resource name="tables.scss" type="css">
          <path>themes/sass/tables.scss</path>
          <processors>
            <processor>sassCss</processor>
          </processors>
        </resource>
        <resource name="tabs_content.scss" type="css">
          <path>themes/sass/tabs_content.scss</path>
          <processors>
            <processor>sassCss</processor>
          </processors>
        </resource>
        <resource name="helpers.scss" type="css">
          <path>themes/sass/helpers.scss</path>
          <processors>
            <processor>sassCss</processor>
          </processors>
        </resource>
        <resource name="polymer.scss" type="css">
          <path>themes/sass/polymer.scss</path>
          <processors>
            <processor>sassCss</processor>
          </processors>
        </resource>
        <resource name="header.scss" type="css">
          <path>themes/sass/header.scss</path>
          <processors>
            <processor>sassCss</processor>
          </processors>
        </resource>
        <resource name="footer.scss" type="css">
          <path>themes/sass/footer.scss</path>
          <processors>
            <processor>sassCss</processor>
          </processors>
        </resource>
        <resource name="nuxeo_dm_specific.scss" type="css">
          <path>themes/sass/nuxeo_dm_specific.scss</path>
          <processors>
            <processor>sassCss</processor>
          </processors>
        </resource>
        <resource name="print_generic.scss" type="css">
          <path>themes/sass/print_generic.scss</path>
          <processors>
            <processor>sassCss</processor>
          </processors>
        </resource>
        <!-- end of resources declaration -->
    
      </extension>
  • nuxeo-platform-imaging-jsf-2021.50.12.jar /OSGI-INF/theme-contrib.xml
    <extension point="resources" target="org.nuxeo.ecm.platform.WebResources">
    
        <resource name="picture_book.css">
          <path>themes/css/picture_book.css</path>
        </resource>
      </extension>
  • nuxeo-platform-ui-select2-2021.50.12.jar /OSGI-INF/theme-contrib.xml
    <extension point="resources" target="org.nuxeo.ecm.platform.WebResources">
        <resource name="select2.css">
          <uri>/css/select2.css</uri>
        </resource>
        <resource name="nuxeo-select2.scss" type="css">
          <path>themes/sass/nuxeo-select2.scss</path>
          <processors>
            <processor>sassCss</processor>
          </processors>
        </resource>
    
        <resource name="nuxeo-select2.js" type="jsfjs">
          <uri>org.nuxeo.select2:nuxeo-select2.min.js</uri>
          <require>select2.js</require>
        </resource>
        <resource name="nuxeo-select2-init.js" type="jsfjs">
          <uri>org.nuxeo.select2:nuxeo-select2-init.min.js</uri>
          <require>nuxeo-select2.js</require>
        </resource>
    
      </extension>
  • nuxeo-platform-audio-jsf-2021.50.12.jar /OSGI-INF/theme-contrib.xml
    <extension point="resources" target="org.nuxeo.ecm.platform.WebResources">
        <resource name="audio-player.js">
          <uri>/scripts/wpaudioplayer/audio-player.js</uri>
        </resource>
      </extension>
  • nuxeo-platform-rendition-web-2021.50.12.jar /OSGI-INF/theme-contrib.xml
    <extension point="resources" target="org.nuxeo.ecm.platform.WebResources">
        <resource name="renditionDefinitions2Formatter.js">
          <uri>/scripts/renditionDefinitions2Formatter.js</uri>
        </resource>
      </extension>
  • nuxeo-diff-jsf-2021.50.12.jar /OSGI-INF/diff-theme-contrib.xml
    <extension point="resources" target="org.nuxeo.ecm.platform.WebResources">
    
        <resource name="diff.css">
          <path>themes/css/diff_result.css</path>
        </resource>
    
      </extension>
  • nuxeo-platform-tag-web-2021.50.12.jar /OSGI-INF/tag-theme-contrib.xml
    <extension point="resources" target="org.nuxeo.ecm.platform.WebResources">
        <resource name="tags2Formatter.js">
          <uri>/scripts/tags2Formatter.js</uri>
        </resource>
      </extension>
  • nuxeo-platform-video-jsf-2021.50.12.jar /OSGI-INF/theme-contrib.xml
    <extension point="resources" target="org.nuxeo.ecm.platform.WebResources">
        <resource name="popup-utils.js">
          <uri>/scripts/popup-utils.js</uri>
        </resource>
        <resource name="video-js.css">
          <uri>/css/video-js.css</uri>
        </resource>
        <resource name="video-js.nx.css">
          <uri>/css/video-js.nx.css</uri>
          <require>video-js.css</require>
        </resource>
        <resource name="videojs.thumbnails.css">
          <uri>/css/videojs.thumbnails.css</uri>
        </resource>
    
        <resource name="video-js.js">
          <uri>/scripts/video.js</uri>
        </resource>
        <resource name="video-player-util.js">
          <uri>/scripts/video-player-util.js</uri>
          <require>video-js.js</require>
        </resource>
        <resource name="videojs.thumbnails.js">
          <uri>/scripts/videojs.thumbnails.js</uri>
          <require>video-js.js</require>
        </resource>
    
        <resource name="platform_video.css">
          <path>themes/css/platform_video.css</path>
        </resource>
      </extension>
  • nuxeo-platform-webapp-base-2021.50.12.jar /OSGI-INF/collection-theme-contrib.xml
    <extension point="resources" target="org.nuxeo.ecm.platform.WebResources">
        <resource name="collections2Formatter.js">
          <uri>/scripts/collections2Formatter.js</uri>
        </resource>
      </extension>
  • nuxeo-routing-web-2021.50.12.jar /OSGI-INF/document-routing-nxthemes-contrib.xml
    <extension point="resources" target="org.nuxeo.ecm.platform.WebResources">
        <resource name="jquery.jsPlumb-1.5.1-min.js">
          <path>scripts/jquery.jsPlumb-1.5.1-min.js</path>
        </resource>
        <resource name="documentRoutingGraph.js">
          <path>scripts/documentRoutingGraph.js</path>
          <require>jquery.jsPlumb-1.5.1-min.js</require>
          <require>automation.js</require>
        </resource>
        <resource name="documentRoutingGraph.css">
          <path>css/documentRoutingGraph.css</path>
        </resource>
      </extension>
  • nuxeo-search-ui-2021.50.12.jar /OSGI-INF/search-theme-contrib.xml
    <extension point="resources" target="org.nuxeo.ecm.platform.WebResources">
    
        <resource name="nuxeo_search_specific.scss" type="css">
          <path>themes/sass/nuxeo_search_specific.scss</path>
          <processors>
            <processor>sassCss</processor>
          </processors>
        </resource>
    
      </extension>
  • nuxeo-user-center-2021.50.12.jar /OSGI-INF/theme-contrib.xml
    <extension point="resources" target="org.nuxeo.ecm.platform.WebResources">
    
        <resource name="nuxeo_usercenter_specific.scss" type="css">
          <path>themes/sass/nuxeo_usercenter_specific.scss</path>
          <processors>
            <processor>sassCss</processor>
          </processors>
        </resource>
    
      </extension>
  • nuxeo-user-oauth-2021.50.12.jar /OSGI-INF/oauth-themes-contrib.xml
    <extension point="resources" target="org.nuxeo.ecm.platform.WebResources">
        <resource name="popup-utils.js">
          <uri>/scripts/popup-utils.js</uri>
        </resource>
      </extension>
  • nuxeo-user-profile-jsf-2021.50.12.jar /OSGI-INF/theme-contrib.xml
    <extension point="resources" target="org.nuxeo.ecm.platform.WebResources">
    
        <resource name="user_profile.scss" type="css">
          <path>themes/sass/user_profile.scss</path>
          <processors>
            <processor>sassCss</processor>
          </processors>
        </resource>
    
      </extension>